/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: 任静
 * @Date: 2020-11-11 15:53:57
 * @LastEditors: 任静
 * @LastEditTime: 2020-11-14 10:12:05
 */
import { createRouter, createWebHistory ,createWebHashHistory} from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Index',
    component: () => import('../views/Index.vue'),
    children:[
      {
        path: '/home',
        name: 'Home',
        component: () => import('../views/index/home/Index.vue'),
      },
      {
        path: '/classifly',
        name: 'Classifly',
        component: () => import('../views/index/classifly/Index.vue'),
      },
      {
        path: '/message',
        name: 'Message',
        component: () => import('../views/index/message/Index.vue'),
      },
      {
        path: '/me',
        name: 'Me',
        component: () => import('../views/index/me/Index.vue'),
      }
    ]
  },
  {
    path: '/detail',
    name: 'Detail',
    component: () => import('../views/index/Detail.vue'),
  },
  {
    path: '/mydata',
    name: 'myData',
    component: () => import('../views/myData.vue'),
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('../views/Search.vue'),
  },
  {
    path: '/searchcontent',
    name: 'Searchcontent',
    component: () => import('../views/SearchContent.vue'),
  }
  
]

const router = createRouter({
  // history: createWebHistory(process.env.BASE_URL),
  history: createWebHashHistory(process.env.BASE_URL),
  routes,
  linkActiveClass:"active"
})

export default router
